<%--
  Created by IntelliJ IDEA.
  User: nguyentrongduy
  Date: 24/7/12
  Time: 4:57 PM
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <meta name="layout" content="main">
    <title></title>
</head>
<body>

<g:render template="/sanPham/createEditProduct/sanPhamHeader" model="['step':2]"></g:render>


<g:if test="${flash.message}">
            <div class="message" role="status">${flash.message}</div>
        </g:if>

        <g:hasErrors bean="${sanPham?.vatLieu}">

            <ul class="errors" role="alert">
                <g:eachError bean="${sanPham?.vatLieu}" var="error">
                    <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                </g:eachError>
            </ul>
        </g:hasErrors>

        <div>
            <g:form>
                <table>
                    <tr>
                        <td>
                            <g:message code="chonVatLieu.ten"></g:message>

                        </td>

                        <td>
                            <input class="" type="text" name="ten" size="30" value="${sanPham?.vatLieu?.ten}" />
                            <span class="fontSmall">
                                <g:message code="chonVatLieu.ten.vidu"></g:message>
                            </span>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <g:message code="chonVatLieu.chatLieu"></g:message>
                        </td>

                        <td><input class="" type="text" name="chatLieu" size="30" value="${sanPham?.vatLieu?.chatLieu}"/></td>
                    </tr>

                    <tr>
                        <td>
                            <g:message code="chonVatLieu.doDay"></g:message>
                        </td>

                        <td>
                            <input class="" type="text" name="doDay" size="6" value="${sanPham?.vatLieu?.doDay}" />
                            <g:message code="donvi.mm"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <g:message code="chonVatLieu.chieuRong"   ></g:message>
                        </td>

                        <td>
                            <input class="" type="text" name="chieuRong" size="6" value="${sanPham?.vatLieu?.chieuRong}" />
                            <g:message code="donvi.mm"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <g:message code="chonVatLieu.chieuDai"></g:message>
                        </td>

                        <td>
                            <input class="" type="text" name="chieuDai" size="6" value="${sanPham?.vatLieu?.chieuDai}"/>
                            <g:message code="donvi.mm"/>
                        </td>
                    </tr>


                    <tr>
                        <td>
                            <g:message code="chonVatLieu.dangCuon"></g:message>
                        </td>

                        <td>
                            <g:checkBox name="dangCuon" checked="${(sanPham?.vatLieu?.dangCuon==true)?'checked':''}"></g:checkBox>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <g:message code="chonVatLieu.dacDiem"></g:message>
                        </td>

                        <td> <g:textArea name="dacDiem" rows="20" cols="8">${sanPham?.vatLieu?.dacDiem}</g:textArea></td>
                    </tr>

                </table>


                <fieldset class="buttons marginTopMiddle">
                    <div class="floatL">
                        <g:submitButton name="quayLai" class="cancel" value="${message(code:'button.quaylai')}" />
                        <g:submitButton name="save" class="save" value="${message(code:'button.tieptuc')}" />
                    </div>


                    <div class="floatR marginRightStd">
                        <g:submitButton name="ketthuc" class="save" value="${message(code:'button.ketthuc')}" />
                    </div>
                    <div class="clear"></div>
                </fieldset>

            </g:form>
        </div>
</body>
</html>